#ifndef __CBSIDE_H__
#define __CBSIDE_H__

enum ESideType
{
  EST_TOP,
  EST_LEFT,
  EST_RIGHT,
};

class CBBall;
class CBSide : public CBBody
{
public:
  CBSide(CBWorld* world,CCPoint &pta,CCPoint &ptb,ESideType sidetype);
  ~CBSide(void);
public:
  virtual void Move(float deltatime,CCPoint& Gravity) {}
  virtual float GetMass() { return 0; }
  virtual bool CalcBodyForce(CCPoint& force) 
  {
    force.x = 0;
    force.y = 0;
    return false;
  }
  virtual bool CheckCollision(CBBody* body);
  float GetDistance(CBBall* ball);
  float GetXLen() {return abs(mPtA.x-mPtB.x);}
  void DisConnect(CBBall* ball);
public:
  ESideType mSideType;
  CBBody** mConnect;
  int mBallNum;
  CCPoint mPtA;
  CCPoint mPtB;
};

#endif
